import React from 'react';
import ReactDOM from 'react-dom';
import registerServiceWorker from './registerServiceWorker';
import { Router, Route, hashHistory, IndexRoute, IndexRedirect } from 'react-router';
import App from './scripts/App';
import PerfectInfo from './scripts/PerfectInfo';
import OrderSuccess from './scripts/OrderSuccess';
import OrderError from './scripts/OrderError';
import Guide from './scripts/Guide';
import OrderInfo from './scripts/OrderInfo';
import Subscribe from './scripts/Subscribe';
import './index.css';

ReactDOM.render((
    <Router history={hashHistory}>
        <Route path="/">
            <IndexRedirect to="/App"/>
            <Route path="/Guide" component={Guide}/>
            <Route path="/App" component={App}>
                <IndexRoute component={PerfectInfo}/>
                <Route path="PerfectInfo" component={PerfectInfo}/>
                <Route path="OrderSuccess" component={OrderSuccess}/>
                <Route path="OrderError" component={OrderError}/>
                <Route path="OrderInfo" component={OrderInfo}/>
                <Route path="Subscribe" component={Subscribe}/>
            </Route>
        </Route>
    </Router>
), document.getElementById('root'));
registerServiceWorker();
